# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=buildcache
pkgver=0.28.9
pkgrel=0
pkgdesc="Advanced compiler accelerator"
url="https://gitlab.com/bits-n-bites/buildcache"
arch="all !s390x !armhf" # failing tests
license="Zlib"
makedepends="
	openssl-dev>3
	cmake
	"
source="https://gitlab.com/bits-n-bites/buildcache/-/archive/v$pkgver/buildcache-v$pkgver.tar.gz
	include-cstdint.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	cmake \
	-B build \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	"src"
	cmake --build build
}

check() {
	cmake --build build --target test
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	rm -rf "$pkgdir/usr/share/lua-examples/"
}

sha512sums="
be543f0fa7550fedad62efbfc90a522d21276f0379fb836b758d775a95e9a0c6c872b397167a129c8d472a03324081cb7d46d6fdc6c7d369a6594fa64358d2f3  buildcache-v0.28.9.tar.gz
c57f6c09cbea6e2781e7d71c58e25659dfb9150779afbadc3a0e4c52de531cc5ecc3094b2b0b9571a0f2542453221c53ca54ed65f7492938d1112fae417c3f36  include-cstdint.patch
"
